<?php 
echo $this->partial('supplier/_tab.phtml', array('row' => $this->supplier));
$params = $this->supplier ? array('s' => $this->supplier->getId()) : array();
?>
<div class="rightfloatbutton">
	<a href="<?php echo $this->url('supplier/contact/addnew', $params);?>" class="button"><?php echo $this->language->load('New Contact');?>»</a>
</div>
<div class="body">
	<table class="list">
		<tr>
			<th class="id"><?php echo $this->language->load('Label');?></th>
			<th><?php echo $this->language->load('Name');?></th>
			<?php if(!$this->supplier) { ?>
			<th><?php echo $this->language->load('Supplier');?></th>
			<?php } ?>
			<th><?php echo $this->language->load('Address');?></th>
			<th class="id"><?php echo $this->language->load('ZipCode');?></th>
			<th class="id"><?php echo $this->language->load('Email');?></th>
			<th class="id"><?php echo $this->language->load('Phone');?></th>
			<th class="id"><?php echo $this->language->load('Mobile');?></th>
			<th class="id">&nbsp;</th>
		</tr>
		<?php foreach($this->list AS $row) { ?>
		<tr>
			<td><a href="<?php echo $this->url('supplier/contact/detail', array('id' => $row->getId()));?>"><?php echo $row->getLabel();?></a></td>
			<td><?php echo $row->getName();?></td>
			<?php if(!$this->supplier) { ?>
			<td><?php echo isset($this->ss[$row->getPrimaryId()]) ? '<a href="' . $this->url('supplier/contact/index', array('s' => $this->ss[$row->getPrimaryId()]->getId())) . '">' . $this->ss[$row->getPrimaryId()]->getTitle() . '</a>' : '';?></td>
			<?php } ?>
			<td><?php echo $row->getProvinceName();?> <?php echo $row->getCityName();?> <?php echo $row->getZoneName();?> <?php echo $row->getAddress();?></td>
			<td><?php echo $row->getZipcode();?></td>
			<td><?php echo $row->getEmail();?></td>
			<td><?php echo $row->getPhone();?></td>
			<td><?php echo $row->getMobile();?></td>
			<td><a href="<?php echo $this->url('supplier/contact/edit', array('id' => $row->getId()));?>"><?php echo $this->language->load('Edit');?>»</a></td>
		</tr>
		<?php } ?>
	</table>
</div>
<div class="body"><?php echo $this->paginator($this->list)->render();?></div>
